package com.codrim.cs.data.server.dao.entity;

import com.codrim.common.utils.bean.BeanUtils;
import com.codrim.cs.data.rpc.dto.result.ConversionDTO;

import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 转化数据bean
 *
 * @author liang.ma
 * @date 05/07/2017
 */
@EqualsAndHashCode(callSuper = true)
@Document(collection = ConversionDO.COLLECTION_NAME)
@Data
public class ConversionDO extends ClickDO implements Serializable {
    public static final String COLLECTION_NAME = "converions";

    private String convertUa;
    private String convertIp;
    private String convertDate;
    private String convertUri;
    private String convertMsg;
    private Integer convertStatus;
    private String forwardDate;
    /**
     * 核减状态
     */
    private Integer scrubStatus;
    private String scrubMsg;
    /**
     * 限量状态
     */
    private Integer capStatus;
    /**
     * 下发请求的响应状态
     */
    private Integer forwardStatus;

    private Integer customerId;
    private Integer advAdvertiserManagerId;
    private Integer advAffiliateManagerId;
    private Integer affAdvertiserManagerId;

    public ConversionDTO toDTO() {
        return BeanUtils.copyProperties(this, ConversionDTO.class);
    }
}
